package myBeans;

import java.io.Serializable;
import javax.faces.application.FacesMessage;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
import javax.faces.context.FacesContext;

@ManagedBean
@ViewScoped
public class TabServerSide implements Serializable 
{

    public String getSlowDownTab() {
        try { Thread.sleep(2000); }
        catch (Exception e) {
            FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, "Server-side tab waiting could not finish.", "Server-side tab waiting could not finish."));
        }
        return "";
    }

    public void setSlowDownTab(String slowDownTab) {}

    public TabServerSide() {
    }
}
